package com.best.oasis.settlement.common.vo.security;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.best.oasis.settlement.common.vo.base.BaseBizVO;

public class RoleGroupVO  extends BaseBizVO implements Serializable {

	private static final long serialVersionUID = -2079939973037314751L;
	
	private Long id;
	private String name;
	private String description;
	private List<RoleVO> roles = new ArrayList<RoleVO>();
	
	private List<UserVO> users = new ArrayList<UserVO>();

	
	public void setId(Long id) {
		this.id = id;
	}
	public Long getId() {
		return id;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getDescription() {
		return description;
	}
	
	   /**
     * {@inheritDoc}
     */
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof RoleGroupVO)) {
            return false;
        }

        final RoleGroupVO obj = (RoleGroupVO) o;

        return !(name != null ? !name.equals(obj.name) : obj.name != null);

    }

    /**
     * {@inheritDoc}
     */
    public int hashCode() {
        return (name != null ? name.hashCode() : 0);
    }

    public int compareTo(Object o) {
        return (equals(o) ? 0 : -1);
    }
    public List<RoleVO> getRoles() {
        return roles;
    }
    public void setRoles(List<RoleVO> roles) {
        this.roles = roles;
    }
    public List<UserVO> getUsers() {
        return users;
    }
    public void setUsers(List<UserVO> users) {
        this.users = users;
    }

}
